﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace TA.Turbo.Controls
{
	/// <summary>
	/// Base class for all simple (non-complex) "value" (non-field) controls.
	/// </summary>
	public abstract class BaseSimpleValueControl : BaseValueDisplayControl, ISimpleControl
	{
		#region PUBLIC
		#region INIT
		#endregion
		#region EVENTS
		#endregion
		#region PROPS
		/// <summary>
		/// Gets or sets a flag which indicates whether or not to render the ID attribute.
		/// </summary>
		[DefaultValue(false)]
		public virtual bool RenderIdAttribute { get; set; }
		#endregion
		#region METHODS
		#endregion
		#endregion
		#region INTERNAL
		#region CONST/STATIC
		#endregion
		#region VARS
		#endregion
		#region PROPS
		#endregion
		#region METHODS
		#region INIT
		/// <summary>
		/// Registers SimpleControl.js.
		/// </summary>
		protected internal override void RegisterIncludes(IncludeCollection includes)
		{
			base.RegisterIncludes(includes);

			SimpleControlCommon.RegisterIncludes(this, includes);
		}
		#endregion
		#region RENDER
		/// <summary>
		/// Returns true if the id attribute is required, otherwise false.
		/// </summary>
		/// <returns></returns>
		protected override bool IsIdAttributeRendered()
		{
			return this.RenderIdAttribute || this.IsTemplated;
		}
		#endregion
		#region HANDLERS
		#endregion
		#endregion
		#endregion


	}
}
